import { lazy } from 'react';

const BSTVisualizer = lazy(() => import('../components/BSTVisualizer'));
const BSTMinAbsDiff = lazy(() => import('../components/BSTMinAbsDiff'));
const BSTMode = lazy(() => import('../components/BSTMode'));
const BinaryTreeLCA = lazy(() => import('../components/BinaryTreeLCA'));
const BSTLowestCommonAncestor = lazy(() => import('../components/BSTLowestCommonAncestor'));
const LinkedListVisualizer = lazy(() => import('../components/LinkedListVisualizer'));
const StackVisualizer = lazy(() => import('../components/StackVisualizer'));
const QueueVisualizer = lazy(() => import('../components/QueueVisualizer'));
const AuxPage = lazy(() => import('../components/AuxPage'));
const BSTDeleteNode = lazy(() => import('../components/BSTDeleteNode'));

export const routeElements = [
  { path: '/', element: <BSTVisualizer /> },
  { path: '/bst', element: <BSTVisualizer /> },
  { path: '/bst/search', element: <BSTVisualizer /> },
  { path: '/bst/validate', element: <BSTVisualizer /> },
  { path: '/bst/delete', element: <BSTDeleteNode /> },
  { path: '/bst/min-abs-diff', element: <BSTMinAbsDiff /> },
  { path: '/list', element: <LinkedListVisualizer /> },
  { path: '/list/validate', element: <LinkedListVisualizer /> },
  { path: '/stack', element: <StackVisualizer /> },
  { path: '/stack/validate', element: <StackVisualizer /> },
  { path: '/queue', element: <QueueVisualizer /> },
  { path: '/queue/validate', element: <QueueVisualizer /> },
  { path: '/user', element: <AuxPage title="用户">Bill is a cat.</AuxPage> },
  { path: '/team', element: <AuxPage title="团队" /> },
  { path: '/files', element: <AuxPage title="文件" /> },
  { path: '/bst/mode', element: <BSTMode /> },
  { path: '/tree/lca', element: <BinaryTreeLCA /> },
  { path: '/bst/bst-lca', element: <BSTLowestCommonAncestor /> },
  { path: '*', element: <AuxPage title="未找到">你访问的页面不存在。</AuxPage> },
];
